package xyz.xtt.schedule.service;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import xyz.xtt.schedule.entity.AssetStaticResourceEntity;
import xyz.xtt.schedule.mapper.asset.TblAssetStaticResourceMapper;

@Service
public class AssetStaticResourceService extends ServiceImpl<TblAssetStaticResourceMapper, AssetStaticResourceEntity> {

	/**
	 * 根据资产id查询资产记录
	 */
	public AssetStaticResourceEntity findByAssetId(String assetId) {
		QueryWrapper<AssetStaticResourceEntity> queryWrapper = new QueryWrapper<>();
		queryWrapper.eq("asset_id", assetId);
		return baseMapper.selectOne(queryWrapper);
	}
}
